package com.bo.baby2.config;

import io.swagger.annotations.Api;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * @program: baby2_p2p
 * @description: 文档配置类
 * @author:波
 * @create: 2020-07-12 13:01
 **/
@Configuration
@EnableSwagger2
public class swagger {
    @Bean
    public Docket createDocket(){
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(new ApiInfo("宝贝投接口文档","宝贝投接口文档","V1.0",null,null,null,null))
                .select()
                .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
                .build();
    }
}
